package com.refusea.train.domain.entity

import com.alibaba.fastjson2.annotation.JSONField
import java.time.LocalDateTime

data class User(
    var id: Int,
    var schoolId: Int,
    val name: String,
    val loginId: String,
    @JSONField(serialize = false, deserialize = false)
    var password: String?,
    var role: Role,
    /** 推荐人 **/
    val referrerId: Int,
    var parentId: Int?,
    var ct: LocalDateTime?,
) {
    var school: String? = null

    enum class Role {
        PRINCIPAL, TEACHER, PARENT, STUDENT, REFERRER
    }
}
